package cn.com.idmy.auth.token;

import cn.com.idmy.auth.Device;
import com.alibaba.fastjson2.JSON;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;


@Data
@Accessors(fluent = true)
@NoArgsConstructor
public class Token<ID> {
    protected String name;
    protected String value;
    protected Boolean logged;
    protected ID id;
    protected long accountType;
    protected long exp;
    protected Long activeExp;
    protected Long idSessionExp;
    protected Long tokenSessionExp;
    protected Device device;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
